import request from '@/utils/request'
import upload from '@/utils/upload'

// 查询承运商信息列表
export function getCarrierList(data) {
	return request({
		url: '/logi/logi/carrier/list',
		method: 'post',
		data:data
	})
}

// 修改承运商信息
export function updateCarrierProfile(data) {
	return request({
		url: '/logi/logi/carrier',
		method: 'put',
		data: data
	})
}

// 新增承运商信息
export function addCarrier(data) {
	return request({
		url: '/logi/logi/carrier',
		method: 'post',
		data: data
	})
}

// 删除承运商信息
export function deleteCarrier(ids) {
	return request({
		url: '/logi/logi/carrier/' + ids,
		method: 'delete'
	})
}

// 获取承运商详细信息
export function getCarrierDetails(id) {
	return request({
		url: '/logi/logi/carrier/'+id,
		method: 'get'
	})
}

// 上传承运商相关附件
export function uploadFile(tempFiles) {
    return upload({
		url: '/sys/oss/upload',
		filePath:tempFiles[0].path,
		file:tempFiles[0].file
    })
}